#define _CRT_SECURE_NO_WARNINGS 1
#pragma once
#include <iostream>
using namespace std;

namespace bit 
{
	class string
	{
	public:
		string()
			:_str(new char[1]{'\0'})
			,_size (0)
			,_capacity(0)
		{}

		~string()
		{
			delete[] _str;
			_str = nullptr;
			_size = 0;
			_capacity = 0;
		}

		string(const char* str)
			:_size(strlen(str))
		{
			_capacity = _size;
			_str = new char[_size + 1];
			strcpy(_str, str);
		}
		const char* c_str()const
		{
			return _str;
		}

	private:
		char* _str;
		size_t _size;
		size_t _capacity;
	};
}